Add Book to My BookshelfPurchase This Book Online

Chapter 4 - Class B Addresses

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 4: Class B Addresses
Overview
  All examples used in this Chapter refer to Class B addresses.
Everything we have learned so far also extends to Class B addresses. There are no new rules or any unique nuances about Class B addresses.
The reason I have created a separate discussion for Class B addresses is because students tend to have more difficulty dealing with Class B addresses, because there are more bits that can be manipulated.
Just keep in mind that everything you have learned so far also applies to Class B addresses; the only difference is we have more bits to manipulate.
The Class B Address
A Class B address contains a first octet value of 128-191.
The Class B default mask is 255.255.0.0
The first 3 octets of a Class C address are not to be changed, meaning we have only the 4th octet to manipulate.
  Tip The first 2 octets of a Class B address are not to be changed, meaning we have two octets that we can change.
Because there are 16 bits that can be manipulated, we have a great deal more addressing space to work with.
Assume we have a Class B address of 172.16.0.0 and we take a 4-bit mask. As we discussed in the previous chapter, a 4-bit mask allows us to have 14 unique networks.
What does change is the number of host bits. We now have 12 host bits.
4 from the 3rd octet
8 from the 4th octet
How many hosts can be addressed on this network?
The formula is the same:
212–2 = 4096 hosts
When working with a Class C address it made no sense to discuss a 7-bit mask, because we would only have 1 host bit available for addressing and in the case of an 8-bit mask we would have 0 bits available for host addressing.
This is not the case for Class B addresses.
A 7-bit mask used with a Class B address still leaves 9 bits to be used for hosts.
An 8-bit mask used with a Class B address still leaves 8 bits to be used for hosts.
Class B Example 4.1
We are given an address of 148.15.0.0. We have determined we need to have addressing space to identify at most 500 locations with at most 100 hosts at each location.
By referring to Table 2.3 and using the combination formula of 2n–2, n must be 9 to give us at least 500 combinations:
29–2= 510
If we use 9 bits to describe our networks or wires we have 7 remaining bits to describe hosts:
27–2 = 126. This provides sufficient host addressing space per wire.
Therefore the mask we shall use is: 255.255.255.128 or /25.
Network Addresses
A mask of 255.255.255.128 means that the 3rd octet can have values between 1 and 255 while the 4th octet will have the most significant bit set as 1 or 0. Refer to Table 4.1.
Table 4.1  Networks with a /25 Mask
148
15
0
0
Zero Subnet
148
15
0
128
First Available Subnet
148
15
1
0
148
15
1
128
148
15
2
0
148
15
2
128
148
15
3
0
148
15
3
128
This pattern continues…
148
15
253
0
148
15
253
128
148
15
254
0
148
15
254
128
148
15
255
0
Last available Subnet
148
15
255
128
Broadcast Subnet
Notice that the multiple rule still applies.
The 4th octet value of all the subnets is a multiple of the least significant subnet bit, in this case either a 0 or 128. Don’t let the zero cause confusion. Zero (0) is a multiple of 128.
Host Addresses
The remaining 7 bits of the 4th octet are host bits, the host addresses for the 148.15.0.128 network shown in Table 4.2.
Table 4.2 Hosts Addresses on the 148.15.0.128 Wire
148
15
0
128
Network
148
15
0
129
First Host
148
15
0
130
148
15
0
131
148
15
0
132
148
15
0
133
This pattern continues…
148
15
0
251
148
15
0
252
148
15
0
253
148
15
0
254
Last Host
148
15
0
255
Broadcast
148
15
1
0
Next Wire
Class B Example 4.2
We are given an address of 148.15.0.0. We have determined we need to have addressing space to identify at most 200 locations with at most 200 hosts at each location.
By referring to Table 2.3 and using the combination formula of 2n–2, n must be 8 to give us at least 200 combinations:
28=254
If we use 8 bits to describe our networks or wires, we have 8 remaining bits (4th octet) to describe hosts:
28–2=254. This provides sufficient host addressing space per wire.
Therefore the mask we shall use is: 255.255.255.0 or /24.
The above case is a very common mask for a Class B address.
Network addresses will range from 148.15.1.0 through 148.15.254.0.
Host addresses for each wire will range from 1 through 254 and if a value of 255 is in the 4th octet, this will identify the broadcast address.
Class A Addresses
A Class A address works in the same way, the difference being that a Class A address provides us with 24 bits that can be manipulated.
Table 4.3 facilitates looking up information for different masks, BUT you should be able to derive every number in this table!
Table 4.3  Subnet and Mask Table

 


 
Books24x7.com, Inc © 2000 –  Feedback